package com.tmy.controller;

import com.tmy.Dto.CommonDto;
import com.tmy.entity.Hotel;
import com.tmy.service.HotelService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;

/**
 * 酒店管理接口
 **/
@RestController
@RequestMapping("/hotel")
public class HotelController {

    @Resource
    private HotelService hotelService;

    /**
     * 新增接口
     */
    @PostMapping("/addHotel")
    public com.tmy.Dto.Result addHotel(@RequestBody Hotel hotel) {
        return  hotelService.addHotel(hotel);
    }
    /**
     * 删除接口
     */
    @PostMapping("/deleteHotel")
    public com.tmy.Dto.Result deleteHotel(@RequestBody Hotel hotel) {
        return  hotelService.deleteHotel(hotel);
    }
    /**
     * 修改接口
     */
    @PostMapping("/updateHotel")
    public com.tmy.Dto.Result updateHotel(@RequestBody Hotel hotel) {
        return  hotelService.updateHotel(hotel);
    }

    /**
     * 批量删除接口
     */
    @PostMapping("/deletesHotel")
    public com.tmy.Dto.Result deletesHotel(@RequestBody CommonDto commonDto) {
        return  hotelService.deletesHotel(commonDto);
    }
    /**
     *酒店分页接口查询
     */
    @PostMapping("/queryHotelPage")
    public com.tmy.Dto.Result queryHotelPage(@RequestBody com.tmy.Dto.PageInfo pageInfo) {
        return  hotelService.queryHotelPage(pageInfo);
    }


    /**
     * 查询酒店
     */
    @PostMapping("/queryHotel")
    public com.tmy.Dto.Result queryHotel(@RequestBody Hotel hotel) {
        return  hotelService.queryHotel(hotel);
    }

}